import QtQuick 2.1
import QtQuick.Window 2.0

Window {
    visible: true
    width: 320; height: 480
    color: "white"

    ListView{
        anchors.fill: parent
        anchors.margins: 10
        spacing: 5
        model: 40
        delegate: listDelegate
        focus: true
    }

    Component{
        id: listDelegate
        Rectangle{
            width: 300; height: 40
            radius: 8
            gradient:Gradient{
                GradientStop{ position: 0.0; color: "white"}
                GradientStop{ position: 0.25; color: "green"}
                GradientStop{ position: 1.0; color: "grey"}
            }

            Text {
                text: index
                anchors.centerIn: parent
                font.pixelSize: 16
                color: "blue"
            }
            MouseArea{
                anchors.fill: parent
            }
        }
    }
}




